<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pygccxml.declarations.algorithm</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pygccxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.language-binding.net">pygccxml</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pygccxml-module.html">Package&nbsp;pygccxml</a> ::
        <a href="pygccxml.declarations-module.html">Package&nbsp;declarations</a> ::
        Module&nbsp;algorithm
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pygccxml.declarations.algorithm-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module algorithm</h1><br /><br />
defines few unrelated algorithms, that works on declarations<br /><br />

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <a href="pygccxml.declarations.algorithm.match_declaration_t-class.html">match_declaration_t</a><br />
      helper class for different search algorithms.
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <a href="pygccxml.declarations.algorithm.visit_function_has_not_been_found_t-class.html">visit_function_has_not_been_found_t</a><br />
      exception that is raised, from <a 
        href="pygccxml.declarations.algorithm-module.html#apply_visitor" 
        class="link">apply_visitor</a>, when a visitor could not be 
        applied.
  </td>
</tr>
</table>

<br />
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#declaration_path" class="summary-sig-name">declaration_path</a>(<span class="summary-sig-arg">decl</span>)</span><br />
      returns a list of parent declarations names
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#full_name" class="summary-sig-name">full_name</a>(<span class="summary-sig-arg">decl</span>)</span><br />
      returns full name of the declaration
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#make_flatten" class="summary-sig-name">make_flatten</a>(<span class="summary-sig-arg">decl_or_decls</span>)</span><br />
      converts tree representation of declarations to flatten one.
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#get_global_namespace" class="summary-sig-name">get_global_namespace</a>(<span class="summary-sig-arg">decls</span>)</span>
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#find_all_declarations" class="summary-sig-name">find_all_declarations</a>(<span class="summary-sig-arg">declarations</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">parent</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">recursive</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fullname</span>=<span class="summary-sig-default">None</span>)</span><br />
      returns a list of all declarations that match criteria, defined by
      developer
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#find_declaration" class="summary-sig-name">find_declaration</a>(<span class="summary-sig-arg">declarations</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">parent</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">recursive</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fullname</span>=<span class="summary-sig-default">None</span>)</span><br />
      returns single declaration that match criteria, defined by 
      developer.
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#find_first_declaration" class="summary-sig-name">find_first_declaration</a>(<span class="summary-sig-arg">declarations</span>,
        <span class="summary-sig-arg">type</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">name</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">parent</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">recursive</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">fullname</span>=<span class="summary-sig-default">None</span>)</span><br />
      returns first declaration that match criteria, defined by 
      developer
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#declaration_files" class="summary-sig-name">declaration_files</a>(<span class="summary-sig-arg">decl_or_decls</span>)</span><br />
      returns set of files
  </td>
</tr>
<tr>
  <td width="15%" align="right" valign="top" class="summary">
    <span class="summary-type">&nbsp;</span>
  </td><td class="summary">
    <span class="summary-sig"><a href="pygccxml.declarations.algorithm-module.html#apply_visitor" class="summary-sig-name">apply_visitor</a>(<span class="summary-sig-arg">visitor</span>,
        <span class="summary-sig-arg">decl_inst</span>)</span><br />
      applies a visitor on declaration instance
  </td>
</tr>
</table>

<br />
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="declaration_path"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">declaration_path</span>(<span class="sig-arg">decl</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br />returns a list of parent declarations names
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>decl</code></strong> (declaration_t) - declaration for which declaration path should be 
          calculated</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>[names], where first item contains top parent name and last 
          item contains decl name</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="full_name"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">full_name</span>(<span class="sig-arg">decl</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br />returns full name of the declaration
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>decl</code></strong> (declaration_t) - declaration for which full name should be calculated. If decl 
          belongs to unnamed namespace, then <a 
          href="pygccxml.declarations.algorithm-module.html#full_name" 
          class="link">full_name</a> is not valid C++ full name.</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>full name of declarations.</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="make_flatten"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">make_flatten</span>(<span class="sig-arg">decl_or_decls</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br />converts tree representation of declarations to flatten one.
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>decl_or_decls</code></strong> (declaration_t or [ declaration_t ]) - reference to list of declaration's or single declaration</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>[ all internal declarations ]</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="get_global_namespace"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">get_global_namespace</span>(<span class="sig-arg">decls</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
</div>
<a name="find_all_declarations"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">find_all_declarations</span>(<span class="sig-arg">declarations</span>,
        <span class="sig-arg">type</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">parent</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">recursive</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fullname</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br /><p>returns a list of all declarations that match criteria, defined by 
  developer</p>
  For more information about arguments see <a 
  href="pygccxml.declarations.algorithm.match_declaration_t-class.html" 
  class="link">match_declaration_t</a> class.
  <dl><dt></dt><dd>
    <dl><dt>Returns:</dt>
        <dd>[ matched declarations ]</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="find_declaration"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">find_declaration</span>(<span class="sig-arg">declarations</span>,
        <span class="sig-arg">type</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">parent</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">recursive</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fullname</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br /><p>returns single declaration that match criteria, defined by developer. 
  If more the one declaration was found None will be returned.</p>
  For more information about arguments see <a 
  href="pygccxml.declarations.algorithm.match_declaration_t-class.html" 
  class="link">match_declaration_t</a> class.
  <dl><dt></dt><dd>
    <dl><dt>Returns:</dt>
        <dd>matched declaration declaration_t or None</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="find_first_declaration"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">find_first_declaration</span>(<span class="sig-arg">declarations</span>,
        <span class="sig-arg">type</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">name</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">parent</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">recursive</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">fullname</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br /><p>returns first declaration that match criteria, defined by 
  developer</p>
  For more information about arguments see <a 
  href="pygccxml.declarations.algorithm.match_declaration_t-class.html" 
  class="link">match_declaration_t</a> class.
  <dl><dt></dt><dd>
    <dl><dt>Returns:</dt>
        <dd>matched declaration declaration_t or None</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="declaration_files"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">declaration_files</span>(<span class="sig-arg">decl_or_decls</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br /><p>returns set of files</p>
  Every declaration is declared in some file. This function returns set,
  that contains all file names of declarations.
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>decl_or_decls</code></strong> (declaration_t or [ declaration_t ]) - reference to list of declaration's or single declaration</li>
    </ul>
    <dl><dt>Returns:</dt>
        <dd>set( declaration file names )</dd></dl>
  </dd></dl>
</td></tr></table>
</div>
<a name="apply_visitor"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">apply_visitor</span>(<span class="sig-arg">visitor</span>,
        <span class="sig-arg">decl_inst</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    >&nbsp;
    </td>
  </table>
  
  <br />applies a visitor on declaration instance
  <dl><dt></dt><dd>
    <dl><dt>Parameters:</dt></dl>
    <ul class="nomargin">
        <li><strong class="pname"><code>visitor</code></strong> (<a 
          href="pygccxml.declarations.type_visitor.type_visitor_t-class.html"
          class="link">type_visitor_t</a> or decl_visitor_t) - instance</li>
    </ul>
  </dd></dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pygccxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://www.language-binding.net">pygccxml</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Thu Oct 19 08:14:25 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
